package com.totem.product.controller;

import com.totem.base.model.Result;
import com.totem.base.mybatis.controller.BaseController;
import com.totem.product.api.ITSubscribeServiceApi;
import com.totem.product.model.TSubscribe;
import com.totem.product.service.ITSubscribeService;
import com.totem.product.vo.SubscribeVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.List;
import java.util.stream.Collectors;

@Slf4j
@RestController
public class SubscribeController extends BaseController<ITSubscribeService, TSubscribe> implements ITSubscribeServiceApi {
    @Override
    public Result<List<SubscribeVO>> list() throws IOException {
        return Result.success(service.all());
    }
}
